package cn.stylefeng.guns.sys.core.constant;

import org.apache.commons.lang3.EnumUtils;

import java.util.List;


/**
 * 设备类型
 *
 * @author tandk
 * @date 2017/10/20 0020 上午 9:05
 */
public enum DeviceType {

    /**
     *
     */
    IPHONE("iPhone"),
    /**
     *
     */
    ANDROID("Android"),
    /**
     *
     */
    WINDOWS("Windows"),
    /**
     *
     */
    LINUX("Linux");


    private String name;

    public String getName(){
        return name;
    }

    DeviceType(String name) {
        this.name = name;
    }

    public static List<DeviceType> ALL = EnumUtils.getEnumList(DeviceType.class);

    public static boolean isContains(String name) {
        for (DeviceType a : ALL) {
            if (a.toString().equals(name)) {
                return true;
            }
        }
        return false;
    }
}
